Refactor layout and add task total on collapse

Refactor layout and add task total on collapse