Update copyright, reformat code, optimize imports