Added structure, corrected some errors.