compile and environment set scripts improved