Fixed Warnings

Removed unused import and closing jar file now. 
And a little cleanup for better legibility.