refactoring task creation to get model direct from scope, bugfix for toggling task complete and archive state