Refactor plugin's basic structure.

Adds namespaces for each popup method.
Plugin includes a settings object.