added more comments, overloaded setWindowTitle() to take strings