Space to tabs, clean up properties, some whitespace - meat here is giving us a wrapper function for showing errors.  Most o the error messages we're displaying should probably actually only be shown to logged in users, maybe even more restrictive than that.