Finished editor mode. Now to clean up code