Class to encode / decode short URLs