refactor CommentResource and AttachmentResource
refactor task resource