added some basic interfaces to the api package so that code can be refactored