Refactor: tests, abstraction level