Code Cleaned Up

Closed Scanner resource
Removed unwanted variables