Auto complete and other fixes

Along with syntax highlighting and other cleanup. Fixes #244 and #211