Hopefully made it easier to read and changed an error message