Changing way of checking if image exists
Changing way of getting menu links.