Cleaning up REST API