added idevices support along with a few minor changes