refactor 'config' object to allow it to be initialized from a hash, including extracting content validations from file-reader