added env.sh, new functions, improved newtask.sh