various refactoring in views, windows.