adds unit tests, minor updates to a few classes