More unit tests + better handling of TooLongError.