Makefile and packaging fixes