Inject request instance

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