Embarassing refactoring...