Refactored widget code
Added support for multiple pages of forms