reformat code and optimize imports