For #12 add cdrules.g_from_CD_helper(fibword).
For #12 add cdrules.fibword_from_index.
For #12 add g_from_CD and CD_from_g.
For #12 add J_from_g (and confident that values are incorrect).