Small code structure refactoring