add back navigation to gallery view and favorites page when coming from those pages; show a grid of gallery items when coming from a gallery page; refactoring of how querystring params are passed around in links