redesigned TaskQueue and added in design comments