Remove dependency on entity