Merge pull request #4 from pjf/master

Lots of minor bugfixes and improvements
Update README + Makefile