Doing house cleaning with server code