Add install, correct some bugs