Added overflow test case and structure tests to createReferences()