Excluded local variables from struct results.
Removed unnecessary $$ assignments.