Refactor author mapping code so it can be used with other importers