Fixed linux compile errors and warnings. Updated Makefile.