Fix some clang errors and tidy the makefile