lots more fixes and testing
Merge pull request #8 from remotezygote/adding-tests

lots more fixes and testing