Initialize task structure