Update device overlay control elements to be declarative.
Tidy device overlay javascript.
Refactor device plugin to under 100 lines.