Simpify code