LPS-46232 Some refactoring for the LayoutExporter and LayoutImporter

Hey Brian,

@danielkocsis did some additional refactoring to this LPS ticket, but somehow it stucked in my review queue, that why I'm sending this to you a bit later. I haven't opened up a new LPS for this, since it is related to the original changeset.

Thanks,

Máté