Big overhaul of dispatcher class