added some tests to improve code coverage
added a better validation mechanism
fixed typo
added a comment to the validation routine
updated documentation/tests
Merge pull request #14 from fasseg/validation

Validation