Prepared the ItemFactory and fixed some smaller bugs.