Fixed syntax errors and reformatted

As individual commits say, fixed two syntax errors and reformatted the code.
Also updated the README to be a bit more legible.