Made a few corrections in the code.