Fixed various warnings. Assigned sane names to environment variables. Ready for testing on real supercomputers