Added a mock test, other minor changes, removing unused imports etc.