Fixing tests, better error handling

Any reason for having these in an object vs. individual values?