reorganizing the logic of the configuration script
	- separated the functions from the main script
	- added README