Misc improvements and fixes for resource locator