Base unit test class and minor cleanups