Move import state

This seems to preserve all runtime behaviour, but gives a 4x speed up and significant file-size saving.