move treatment of passed options into separate section
add hooks for plugin user to act on different outcomes