Changed html img and a tags to rails image_tag and link_to functions