Fixed token url, changed how $home is calculated