Refactor variables