Refactoring some code, rename some methods.