removed common_tools.flatten function
removed settings from common_tools
removed settingminor cleanup to common_tools