Added some small changes, corrected some error statements.