Refactoring

Removed unreachable code