Add some comments and remove unnused code

Change-Id: I6ad4094c3dae5e99aa885d9a00905fc96f37cc34