Separated API functionality to separate file so we can easily make sure the core doesn't break when new API functions are added