Modified a lot making the moduleregistry work with items with metadata