Fix & cleanup unit tests