Combine expansion exception checks

Speed increase by combining 4 exception checks to 2.
And (again ;-) some layout smoothing.
Merge pull request #14 from bpcvdhelm/patch-7

Combine expansion exception checks