Rename "$replacement" parameter to "$replacements" in translate functions and methods
Correct code, add DOC-comments
Improve recursion handling in reports