Added logic for making shortlink.