Added unittests for itempool, bugfixing itempools