Corrected many errors