refactored error messages

The `.err <` and `>\r\nend\r\n\x1a` strings that make up the "borders"
of bracket error messages have been moved into separate strings, to
avoid repetition and allow for easier refactoring in the future.