Replaced usage of connection with usage of branch for text insertion and
removal in text model.

Signed-off-by: Jakob Brandsborg Ehmsen <jakobehmsen.github@gmail.com>