small style improvements and syntax error fixes