Fixed a number of bugs in the editor and styling