Improved XInput support, misc tweaks