add layers and clean codes

Change-Id: Ib687b94e9ee9dfc9c5614a65a4a463b795cd2f68