Added reference tests in new file, check for circular dependencies