Add integration tests, refactor success flash