cleaned up URL handling to get rid of extra slashes