Refactor variables to improve modularity.