Add tests and fix runner