Improves window handling
Handles ui