Refs #8587 Refactoring and code tidy.
Merge branch 'feature/8587_DOS_port' into develop