Reverted refactoring partially to resolve failing tests. Tests are a saviour!