Simplify Makefile.
Fix sign-compare warning.
Improve logging.