Refactor to have the IP centralized