Do some refactoring to prevent code duplication; change string sequence generation...