This, and repository are both set after the constructor