Remove and refactor unit tests