I think that the function are different enough that they should remain separate.

The second param is validated in the regex, so that will have to be fixed. Second param is optional, but it should accept any text (`\w`) instead of just `start|end`, then it can be corrected in that func.