Added logging code to server keep alive requests.
Also reformated some code.