Added the comments

Added comments and changed reverse list function