Code refactoring and import/export feature added