Fix bugs of import file1 code, add new class on models and refactor some functions