Add stuff for conditional PUTs

Also
* Change all the indents to 4 spaces
* Fix a few typos