Clean up "magic number" usage
Use XNIO 3.1.0.Final
Minor code cleanup
Fix wrong exception type