Issue: #4
- Corrected a cast.
- Refactored an unnecessary else.