Refactor marking windows as dirty and status bar new indicator