Moved import logic to a new file