Adapted Itembased algorithm and small bugfixes/optimizations