Clean up server code

Signed-off-by: Ian Macalinao <ian@giza.us>