Optimizations, fix for Makefile.