Small cleanup and changed the error const names for darwin errors.