Removed internal decode functions and fixed a bug with contrib wrappers