Use correct types in pointer passing for config_data.
Set max URI length back to 1024.
Fix typos and convert all new comments with // to /* */ style.

Also updates and adds TODOs for memory related, and thread safety
correctness cases that need testing...