Clean up the code.
Merge branch 'devices'