Refactored adding tasks to list and fixed a bug

Previously list generation was in two different places
I consolidated it into one place and made it more readable
I also changed the click event on the expandable class to locate
it's sibling correctly