Fixes issue 3 plus minor cosmetic stuff

Hi,

I believe this fixes issue #3, plus a few typos, a .gitignore etc.

Cheers,
Andrew McMillan.