Refactored the value mixin to use a passed variable.