updated some documentation and comments