First draft documentation

I gave all the functions in the files documentation. It's not complete,
but it should help keep us out of trouble.