Use modern coding constructs and a better var name