v0.0.4 unit tests and cleanup