Move URL parsing to separate file.
Minor cleanup.
Add basic benchmarks.
Don't lock buffer if we don't need to.
Cleanup. Combine buffer and mutex.
30-50% performance boost.