fixed bugs in the interface. And removed garbages.