add a little documentation and other minor changes