Added comments

Added comments wherever applicable.