refactor device files

Change-Id: I81e8f2973c776522e42c0a067c34c486fc0a0bfb