fix some linker errors. makefile still incomplete