Added more detailed comments

Added more detailed comments about what is happening throughout the script.