Updated comments and documentation