Added constructor that clones given task object