Added basic API, requires some work