added environment info update functionality; fixed various compile
errors and  bugs