move to lib.
add command dipatcher.
fix package install files.