Moved api methods to folder and added a main api class.