CommTask.c refactor