Added ability to save references to other entities