Removed all unused imports and most unused fields.