Added customisable alphabets. Changed the signature for the id generation function in preparation for pluggable id-generation functions