Added some function comments