fixed bugs and added syntax highlight