[Consolidated] some redundant code

Change-Id: Ia25b57f52936ceb155bcace8ff23f7ea673a6ac6