Core: organize import + reformat code