Added to notes and Cleaning up MainFUnctions