Removed unused code from decoder
Fixed issue with custom types not being encoded