split apart the too-large main; added a toString to the Environment class
parsing CLI options