reorganizing the comand-line slightly; more global variable problems fixed