Separated the dynamic importing code from init