Added the level editor and some fixes to get the level editor working.