refactored decodeDetails heavily