improved output, add env task, minor refactorings