Removed some more unused imports
Proper handling for empty format lists