INTERNAL: minor re-factoring.