init init command, and remove some useless code in common