Added a method for singleton Code entities to get called when a new "instance" of the singleton is loaded.