Clean up Java server code