Refactor tests

Tests should be as clear as production code

- Eliminate duplication in tests
- Fix some trivial naming bugs in tests
- Improve readability

Now we are ready to start refactoring the code