Improved compose_text and added a module specific for it.