Added basic API. Relates to #2