Minor changes for "best practice" design

Remove CreateFrame upvalue due to infrequent use. Change line 19
variable i to descriptive variable bag and update variable usage. Change
line 22 variable n to descriptive variable slot and update variable
usage. Change line 31 variable k for conventional placeholder _ due to
unused key data. Change line 43 if to elseif for code simplification.