bug fixed 'not validating empty foreignSource name string'
added pre-processing for 'categories'