Improved formatting, fixed more syntax errors