Fixed problem with returning errors when generated by the transport layer rather than a provider.
Fixed problem with encoding context not always being passed to encoders.
Updated Javadoc.
Updated Javadoc.
Updated Javadoc and removed dead code.
Fixed encoding and decoding.