Activate window on open (would sometime not activate)
Refactoring: Remove unused references