Add tests and refactor