Proxy server socket now only binds to localhost (issue #232)
Line endings, whitespace, imports and casts cleanup