small widget architecture, store js refactor