Updated Task and Queue

Updated both constructors and the method refresh() of queue was created.