added different states for load/menu/play, moved into seperate js files and reformatted all the code to fit new structure