Finished API implementation

@cc #3