Start modularization; improve import function