Cleaned up the if-elses a bit.

A revision to #73