Harmony text

Some small changes to improve text handling. Ready to merge.