major refactor to improve/stabalize integration tests