Refactor visualizations and widgets into packages and single files.