Refactored the add imports block