Added some null pointer checks in edit mode and added some levels.