fixed a series of warnings; continued work on Makefile