Apply some coding standard

At least as far as layout goes. Sort of a horrible commit but better to
do it now rather than later.
Clean readme a bit
Fix up some possible memory leaks