Fixing errors.
Fixing errors and cleaning up.