refactoring. Moved common event processing to EntityWindow
Introduced ViewFactory.