Add comments
Fix minor efficiency bug in parse_pct_encoded()
Rename variable reserved -> preserved in two places
Minor optimizations, remove unused code