COUCHDB-2125 Sort tasks

This might need some styling / concept love and I hope I understood the comments in the ticket.

This PR includes a heavy refactor, which is also a separate PR #203 which can get merged earlier without a discussion regarding the concept and design, and I will update this PR as the other PR changes.