Refactors galore. Access reduced in places it wasn't being used; many unused methods eliminated.
New logic for hex parsing.
Calls to command() are now mostly in separate methods. writePacket logic is given a private OutputStream subclass so that we can use ByteArrayOutputStream for buffering without a severe penalty.