Added some structure to plugin and some work on dialog