Added support for checking syntax the the code editor and more code clean up.