Updated comments and made other minor changes