Finished 'widget state' update.

Module now saves widget state (expanded vs. collapsed) in the DB.