Simplify code