remove comments, fix syntax errors