Clean up the server code and use the new config methods