Minor Housekeeping

Removed minor resource leaks from leaving various IO streams open,
removed unused imports, removed old comments, etc.