Added pre_invoked_tasks. #baelfire-21 done