Add generator for creating widgets. Fixes #10