Various code simplification.