For #344, Added a setting to trim keys and values