code improvements

Change-Id: I389c166fc5823d11dcf3ee4707029536f448ad78