Fix e2e tests
Refactor server tasks