Task.c some routines optimisations