Added self reference to sub codes