Refactor strings

Yeah, the only function really called externally is merge_text which now returns a three element array instead of just text.