tidying up of code:
	Commented out code deleted
	Code for diagnostic/informative printouts restructured
		into separate function