Change API to use NSURL rather than NSString