reformat and fix makefile