add tests plus cleanup
Merge pull request #1 from patrickarlt/newmanw

add tests and general cleanup