Remove trailing whitespace
Improve reverse DNS lookup of remote IP
Formatting cleanup