Change variable names and turn the class into a generic one