create an Anchor object to contain information about the anchor.

Move the setup of eventhandling for that button to a method on that object.
create a Popup object and move render and remove functions into the Popup object.
move repositionPopup into the popup object
move hidePopup / showPopup to Popup object
add callMeMaybe callback caller method
reposition fixup subscription disposal
move opening / closing logic into the popup object
generalize beforeCalling method to just call a series of methods in sequence
Use knockout to remove rendered popupTemplate.
call addCloseHandler before afterOpen hook.
polishing
remove unused option
simplifying
simplify configuration
separate the config fixups
group handling setup
Merge pull request #3 from One-com/feature/refactor

Refactor