Move context creation to parent class