Added URI encoding & Added tests

Tests to complete coverage and cover new functionality (URI encoding)