Merge "Simplify code" am: 2a1c0dd6df
am: 9d76ebd7d4

Change-Id: I7e6524081a7d0513ff2e3fe8150b758ad31b1acf