Code improvements

Change-Id: I41b694e3d57281b5b564ebd33ecb8bb4a0a0c139