General methods of alkaloid synthesis