Sometimes hunting for that little “x” to close the window can be a pain. Hit Ctrl and W on your keyboard to quickly close a tab or a window.

Command and W in OS X.