More Integration tests, and related bug fixes