Refactoring

* Fixes issues with browser refresh
* Simpler server