Refactored rates tests with using of Q
Refactored server with using of Q