How do I hide the "open window icons" in the dock in OSX 10.10? I recently got my very first MacBook Pro. It has OSX 10.10 Yosemite on it.

After some time, though, I noticed that there are many icons accumulating in my dock that just represent open windows. Note that I do not mean the application icons themselves (see screenshot for clarification). 

How can I disable these "open window" icons so that only application icons show up?

Bothersome icons:
I actually found an answer to this question now.

Apparently, there is an option "Minimize windows into application icon" in System Preferences > Dock that will accomplish what I want.

The option mentioned: