Changed onclick handlers to the logged version.
Added ability to intercept the activiation of an action.
removed unused imports.