Refactor and use server url to fetch core