Refactor into app.device package.
Refactor out of app package.