Fix errors with proxying websocket connections.
Refactorings/Ginkifying

Signed-off-by: Matthew McNew <mmcnew@pivotallabs.com>