Well, first off, it's believed by most secular Bible scholars that the beginning of Genesis describes an empty chaotic ocean, or the void. It is similar to the Enuma Elish, in that God is creating order from chaos. It's believed to have been written around the Babylonian captivity.
That is what we think the originally intended meaning is. However, many religious people interpret "in the beginning God created the heavens and the earth" as a prequel to the first chapter, rather than a summary. But there are two main things that tell me that's not the case. One is that it specifies the creation of the heavens on the 2nd day. The other is that the poem has a closing line, Genesis 2:4. I think in the NEB and REB (I have the NEB, you have the REB) they have gone ahead and split verse 1:24 this way so that it's more clear. Many other translations, however, include it in the Adam & Eve section of the creation story.
The first chapter is really a poem, like the Enuma Elish, and it has a LOT of symmetry in it. For example, on the first day he created light and separated light from darkness (yes, before the stars and sun were in the sky). This created the necessary environment for the sun, stars, and moon on day 4. On day 2 he created the sky (that solid dome I talked about earlier) and put part of the primeval ocean above it, and part below. Now we have sky and sea, for the birds and fish to live in which were created on day 5. And on day 3 he creates dry land and plants, which support the animals and people on day 6.
It's believed that the second part of the creation story -- about Adam and Eve -- is actually an older story predating the Babylonian Exile (which is when the chapter 1 story was written). When they decided to put them into written form, a redactor wove the two stories together. It wasn't perfect, and you can see how they were probably independent at first. That's why you have those contradictions.
A lot of the Torah was combined from two or more different sources. Particularly the accounts from the northern country of Israel, and the southern country of Judah. This is called the documentary hypothesis. There are certain clues for telling the different ones apart, such as the name(s) they have for God, their level of formality, and that sort of thing.
If you want me to say more on the documentary hypothesis, I have some information from a book that may be helpful. You can also of course find plenty of stuff on the web about it.
http://faculty.hope.edu/bandstra/rtot/
Here's one example website. It's from a liberal Christian point of view. You didnt use to have to register, but now apparently you do.