Modularized and restructured. Widget UI temporarily nonfunctional.