fix const protocols to non const (lib must have write access to this data), add internal extensions