Various updates made to the code.