First pass at factoring out test constructs, cleanup of e2e tests