Remove some duplication in compositing
Fix a few nits
Use expect instead of unwrap
fix merge conflict (parse_url)
fix merge conflicts