Housekeeping

Simplified some logic a bit.