Apollo 3946 partial refactor