Changed TaskManager to a singleton