Refactored code for relative imports