Improved multiple device support and made other small changes