Fixed a few syntax errors, reformatted for readability