Refactoring the class to remove useless conditions ( else )