Add websocket tests. Tests refactor. Fix bugs in game engine.

Tests:
    startTesting request is sent after each spec.
    All needed requests are sent before each spec.