Added comments

Updated with function comments