Deleted unused variables and converted to using enum classes.