code cleanup, tests, stricter params
1.0.0