started writing the generator code for items

(not finished and not yet tested though...)