Irving/factor out commonalities

:construction: WIP