Refactoring: finish step1, codes rearrange

Change-Id: Ib11c1264c0b5f3964cb9925d805753b4edfe0141