Refactor codes.
Refactor codes remove useless methods.