Merge pull request #196 from GERey/Fix-Core-Tests

Fixes to several Core module tests to get them passing with Core Persistence.
Couple more fixes to Core Persistence implementation of RelationManager.