Many small fixes and two function additions ( removeitem , count)