Tests/refactor