Clean up REST handler