Changes to support manipulating tasks + a few fixes