Progress on generic URI encoder. Relates to #1.