removed lots of unused code
implemented set_limit_item to calc correct totals in the case of drop or keep conditions
fixes in calculations