cleanup in configuration 
moving options to plugin
making cookieKey an option
options.resetContainer is never set in module, so the function .hasParent seems obsolete.