Support multiple devices

This supports multiple devices. Also fixes glitch I had with permissions, and explains syntax...