deep refactoring. New widget management, main widget linked to real data. still buggy though