Fixed top file and syntax errors