Fix URL encoding bug
Improve comments