Fixed potential logical issues
Cleanup use statements
Merge pull request #3495 from GrahamCampbell/minor-fixes

Minor Fixes