Fixes all defined(@array) entries in the lib code, except the site folder according to #406
Additional fix based in feedback from @JaredF
Applied patch from @JaredF
Correct Defined Hop Array Check
Further Fix Hop Array Definition Test
Merge pull request #411 from krkeegan/fix_issue_406

Fix issue 406: thank you @krkeegan for this fix.
Merge pull request #408 from hollie/fix_#406_deprecated_code

Fix #406 deprecated code