Fix for task deletion flow logic, block scoping fixes and decorator changes