Some debugging after refactoring