Added url encoding and decoding utility functions.