INTERNAL: minor code re-factoring.