Inject request instance in handler

* Refactoring interfaces
* Make code PSR-2 compliant
* Refactoring to work with web socket server library