various changes
  - fix alphabet index->code missuse
  - add more testing for alphabet
  - fix issues in cost-matrix
  - improve cost-matrix by being informed by structure of TCM
improve mlModule signature (use model instead of spec in api)
remove unused functions
resolve merge conflict