Smart pointers for containers => no more manual delete

also added some constness and removed the deal counters that could be replaced by using container sizes