restructure PoemComposer, and add manual substitution support in gui