Cleaned up some cruft, small bugs, and copy/paste errors in unit tests