Clean up some serverside code