Initial import of API wrapper, various updates