Added more comments, deleted extraneous code.