added conversion of local urls
removed old garbage