Small code cleanup in env drivers