cleaning the result string
removing some ugly code
fixed so routes work when selfhosted