Support for widgets!

Initial commit of widget support. Has quite a few rough edges, hope to
smooth them out during the next few days