Refactored record keeping into an instance variable