Removing a bunch of unnecessary 'if' logic.