Updated some documentation and comments