Added some pseudocode placeholders for much of the main logic