Is there a way to prevent apps from staying in Dock after quitting?
I think I understand your problem.. Open System Preferences, Click on dock, uncheck "Show recent applications in dock". This should probably solve your problem.