Allow config object in place of string URLs
Refactor URL parsing, add test, and update API docs