It’s sometimes annoying to have too many icons filling up your dock:
But don’t worry, it can be fixed with a simple line of code in Terminal:
defaults write /Applications/ApplicationName.app/Contents/Info LSUIElement -string 1
This line will deactivate the icon for the application even if the application is open.
Note that the only way to quit an application other than through the dock is from the menu bar.