codegen: split and join characters, not strings; cleanup tests