fixed compilation errors. added files to Makefile