First half implementation of init command.