Updated editor code to be much simpler, be more modular, and be easier to extend