Refactored according to proposed structure
Tested some of the theory behind several clients in one browser

Seems to work!