first attempt at consolidating error messages, fixing tests, and fixing the transaction lock issues