Added better task flattening and task sorting by completion date
Fixed some date vs datetime sorting issues and made --prune trigger a visitor