restructured to modularize windows, use jqwidgets