Comments and minor code changes