Code behind our in-house link shortener