Refactored internal representation