Fixing error output. Cleaning up other things.