Cleaned up server code slightly.