Added significant comments and code description.