some refactoring, support for arrays of const chars