Simplification of API and unit tests