Error corrections
All unit tests written. Not tested yet.