Parameterized some features, fixed bugs