Cleanup websocket handler code

Signed-off-by: Dakota Bailey <dbailey@pivotallabs.com>