Task creation factory