Some reorganization, makefile, simple cmd interface.