Add tests and fix naming.