Add integration tests to cover most functionality