clean some unused code and rename some methods