Add alphabet parameter to internal functions.