Add tests and better logging