Work in progress. Needs to be further adapted to new relationship schema.