Adding tests and impl.