Changed plugin boilerplate. Added public methods for next/previous. Added onBeforeNext/onBeforePrevious hooks