I think this can now be done with decorators. But that is for another day.