Fixed bug with relationship names. Cleaned up. DHH-296