Fix references, fix makefile