fleshed out some test cases.
quick refactoring.
wrote tests for process_url().
process_url() passes all tests.