Refactor sidebar with widget.enchant.js