documentation and some formatting changes