chapterRepository created query building moved into it, formtype refactored, chapter duplication tool added