Extract the importer code as Importer class from NewPortalConfigListener for reuse purposes
Remove unnecessary casts