Fixed syntax highlighting and code cleanup