Integrated the API
finished clean up