Moved Di definitions to new class based format

the problem seems here.