Commented Final Code