Updated and added comments for header files as well as certain functions