Rearranged the main file to make visualization toggle easier