This removes a lot of lines while at the same time preventing printing a string onto itself, which is a bug. Problem was found by cppcheck.