Refactored and simplified variable model