Added some things

-Added view_doc() function.
-Added more comments