level editor and bug fixes