Fix logic structure and ChordPack representation