Fixed some CSS and JS glitch with the editor.

There seems to be a bug when the editor is being loaded. Previous commit
removed all exceptions but rendered the editor useless. Now, I
reintroduced some of the previous code and there's still one exception
that needs to be handled. I'm not sure if that exception can be avoided.
Further inquiries will be needed.