CDB-4182 Started refactoring importer typecaster, on hold for now so jus...

...t commiting already done stuff