Added tests in, and updated the README and gitignore rules accordingly.
Some fixes.