Added phpunit support and some tests
Refactor continues to remove weird brace notation
General tidying up and validation
Merge pull request #2 from tomcroft/develop

Added phpunit support and some tests