Added appropriate comments for a couple of functions