Rewrite processing loop to validate then process
Add comment to why dictionary is being passed back