The real issue here is the code duplication. String mixins should be used.