Added comments, and few fixes