small refactoring;
fix websocket location formatting.