Update server to handle change in Tornado functionality
Refactoring, fixing console errors
Further refactor; works as it used to