refactored task and task stage; one task stage type per task type