I have always been interested on dreams, their meaning, what happens in our brains while we are dreaming...and perhaps, the latter view regarding dreams is the one which I agree the most. This idea is represented by the British psychologist Christopher Evans and he proposed that the brain functions like a computer and that dreaming represents "offline" time when it processes information and updates its programs. I think that when we dream our brain is able to connect actual and old information so that they interact and create new relationships. These new relationships are like answers to our real problems, fears, conflicts...
When I dream and I can remember it, I can easily see all my dreams or nightmares have a bit of my past and a bit of my present. I find amazing how my brain can bring back a memory and connect it to my actual situation in a combination that I would have never thought of when I'm not sleeping.