Fixing scope on parameters, plus some indents. Adding "adhoc_isset_array".