Further omptimization for import code