Restructure code base for more dynamic decoding