Added more comments of what the lines of code are meant to accomplish.