Refactored some useless code.