One thing that helps shed light on the Torah, or 5 "books of moses," is the fact that it was common practice for thousands of years to attribute your writing to an earlier, famous writer, as a way of "honoring" that writer (and stealing some glory while you were at it). The first 12 chapters of Genesis is clearly a hodgepodge of oral stories passed down for generations. The comes the whole thing with Abraham, Isaac, and Isaac's 12 sons - the fictional years of slavery in Egypt which made those sons' descendants into different tribes - and finally the whole Moses-in-the-desert story. It seems pretty clear that the entire Torah was assembled piecemeal over time, and as new stories entered the scene, they were always attributed to "moses."
So the garden story, tower of babel, the flood and all the rest probably pre-dates all the law stuff by many generations.
Another interesting factoid: Although the Torah is supposedly the earliest written part of the Bible, the language in Job is far more archaic than anything else in the OT. Job was the first book of the Bible to be written down. The rest came hundreds of years later.