Minor code reordering/clean up.