Add support to set global occurences and refresh values for handlers

This PR is to tidy up changes discussed in #51