Refactor MCF decoding