WIP: Set out better factored functions.