Adding device to window.
Updating example code to point to new lib.