Further simplify code