Make the clean up routines server side