cleaned up some stuff, added unit tests and code coverage tracking