Initial API implementation

Implemented API as proposed in #72