Refactored useless code