Add tests and basis generation.