Prefactoring, from TDDAYMI to imperative shell. In the next step we need the implementation from the functional core in the imperative shell, to pass in the environment variable.