Basic structure refactored