core: reformat code