Please factor this boilerplate out into part of the framework