Cleaned up superfluous logic.