Fixing small issue and adding some comments