optimized Makefile, build procedure and code structure.
update