Set window modal and removed removeExistingWindow()

closes #311