Fix gallery open

The gallery overrides `open` in incompatible way: it doesn't call any `before|afterOpen` callback.

This fixes it and simplifies it by providing an `afterOpen` that piggy backs on any callback given in the settings.

This builds on #21 and #12, check last commit