Moved task executing to tasks module.