Corrected a few issues in the code. Final 2. 4.1