improved some documentation and formatting