Basic implementation and unit tests