Code cleanup and a bug fix

There were mismatched indents and some other styling mismatches that I tried to clean up with this. Take a look and let me know what you think. I added style guides to the readme to make it a little clearer on what new contributions should (ideally) look like.