Minor code changes interally

CHG: removed extra call to $opt['query']
CHG: remove superfluous comments, variable renaming