Move all URLs to lower-case, some refactoring