Code review and add comments