Refactoring Animal class