Synthesis of Substituted Pyrrolidines and Pyrrolizidines