More documentation and some clean up