Adding DocumentLoop and SystemHandler, generic engine scripts