Added util to get the last URL component