Massive refactor to put teacher code in seperate file from main