Added stuff to the level editor

structured the main file into a class