Comments and code formatting updated