Update comments and documentation

added comments