Added code to prepare the edit and delete links.