improved import structures and calling procedures in main_panel