Convert line endings
Removed unused module imports; Use framework function to urlencode string.