MAX!Cube minor refactoring (no functional changes)