API mostly done for now