added device.js library, did some javascript changes and edited casefiles
Merge branch 'feature'