Variables and tasks refactoring