Fix lots of things
Merge pull request #2 from ForbesLindesay/patch-1

Fix lots of things