loads of refactoring, completely reworked how formatting and substrings are tracked and managed, added a `wrap` argument to most methods to force wrapping everything with the new formatting