Simplify code a bit.