minor hygiene & refactor for sockjs tornado server