removed some n+1 issues in task and contacts views