Small refactor and add App to device model