You have to face facts: carpets are kind of nasty. They accumulate dust and debris, hold smells, and just get generally dingy with use. You can have them cleaned, but that's not something most of us do often. In between cleanings, try refreshing your carpets with this DIY solution.
First, sweep your carpet to lift loose dirt out of the fibres and then give it a good vacuuming. Sprinkle a mix of 2 parts polenta to 1 part borax over the entire carpet. Let that sit for about an hour, then vacuum it up. This trick should remove odour and even light stains. If you like, you could even sprinkle some essential oils, herbs or other fragrances into the mix.