Minor code restructure.