Finally finished the core of the API