Simplify some code.