Refactored many variables