Ported refs and annotations to new plugin API

Also deleted htmlifier and indexer since this is the last feature missing...
not sure. Ported from the old code base so I assumed it must have come up