Work on alphabet optimisation, not yet finished, commit for safekeeping