More refactors

Signed-off-by: Ken Barber <ken@bob.sh>