* Cleaned up open window code a bit
* Now establishes connection and throws an error if it's invalid