optimize imports and call super.finalize