Class structure refactoring