Added simple test for class dependency mechanism and fixed some details. Test is green now.