That looks fine. It's a style thing, but I prefer self-contained functions that make
good building blocks over monster objects.