url encode, empty result message
code cleanup