Cleanup.

Removing unused imports, unused variables, errant spaces and tabs, and
fixing an issue with PCAPs from exchange format imports where it would
crash due to a variable being misnamed.