JSHint fixes for server code