Started implementing the API, divided into several source files