Hi,
You followed the "simple way" of creating a Designer plugin.
For a "real world" approach take a look at this.
Short version: you split your plugin code in two:
a library which will include your widget(s)
the plugin itself
That way you have the plugin for designer and you can link your application to the library which will not have any dependency on designer related code.
Hope it helps