removed unused imports, fixed some tests, refactored mocks