Unnecessary functions deleted. Creation of config dir added.