widget refactoring & cleanup