refactor ajax calls
comments and task permissions