Refactor

in the end I realized that the error I was tracking down was just my office's mishandling of websockets

refactored to be much nicer to work with.