Clean up server-side code