--- a/cmajor++/Cm/Cm.Core/ClassFun.cpp
+++ b/cmajor++/Cm/Cm.Core/ClassFun.cpp
@@ -153,7 +153,7 @@
         {
             MemberVariablePtr memberVar = memberVars[i];
             Llvm::Ir::MemberVarPtr irMemberVar = Llvm::Ir::MemberVarPtr(new Llvm::Ir::MemberVar(memberVar->Name(), Llvm::Ir::CreateParameter("this", Llvm::Ir::Pointer(classType.lock()->IrType())), 
-                memberVar->Index(), memberVar->GetType()->IrType()));
+                memberVar->GetIndex(), memberVar->GetType()->IrType()));
             irMemberVars.push_back(irMemberVar);
             ArgumentVector args;
             args.push_back(Argument(MakePointerType(memberVar->GetType(), TypeCheckExtent::signature), ArgumentCategory::lvalue));
@@ -450,10 +450,10 @@
             GenResult memberResult(ir, flags);
             MemberVariablePtr memberVar = memberVars[i];
             bool isClassType = memberVar->GetType()->IsClassType();
-            Llvm::Ir::MemberVarPtr left(new Llvm::Ir::MemberVar(memberVar->Name(), Llvm::Ir::CreateParameter("this", classPtrType->IrType()), memberVar->Index(), memberVar->GetType()->IrType()));
+            Llvm::Ir::MemberVarPtr left(new Llvm::Ir::MemberVar(memberVar->Name(), Llvm::Ir::CreateParameter("this", classPtrType->IrType()), memberVar->GetIndex(), memberVar->GetType()->IrType()));
             ir.SetNextInstructionComment(memberVars[i]->FullName());
             memberResult.AddObject(isClassType ? left->CreateAddr(ir, memberVar->GetType()->IrType()): left);
-            Llvm::Ir::MemberVarPtr right(new Llvm::Ir::MemberVar(memberVar->Name(), Llvm::Ir::CreateParameter("that", classPtrType->IrType()), memberVar->Index(), memberVar->GetType()->IrType()));
+            Llvm::Ir::MemberVarPtr right(new Llvm::Ir::MemberVar(memberVar->Name(), Llvm::Ir::CreateParameter("that", classPtrType->IrType()), memberVar->GetIndex(), memberVar->GetType()->IrType()));
             memberResult.AddObject(isClassType ? right->CreateAddr(ir, memberVar->GetType()->IrType()) : right);
             ir.SetNextInstructionComment(memberConstructorCalls[i]->ToString());
             memberConstructorCalls[i]->Generate(ir, memberResult);
@@ -684,9 +684,9 @@
             MemberVariablePtr memberVar = memberVars[i];
             bool isClassType = memberVar->GetType()->IsClassType();
             ir.SetNextInstructionComment(memberVars[i]->FullName());
-            Llvm::Ir::MemberVarPtr left(new Llvm::Ir::MemberVar(memberVar->Name(), Llvm::Ir::CreateParameter("this", classPtrType->IrType()), memberVar->Index(), memberVar->GetType()->IrType()));
+            Llvm::Ir::MemberVarPtr left(new Llvm::Ir::MemberVar(memberVar->Name(), Llvm::Ir::CreateParameter("this", classPtrType->IrType()), memberVar->GetIndex(), memberVar->GetType()->IrType()));
             memberResult.AddObject(isClassType ? left->CreateAddr(ir, memberVar->GetType()->IrType()): left);
-            Llvm::Ir::MemberVarPtr right(new Llvm::Ir::MemberVar(memberVar->Name(), Llvm::Ir::CreateParameter("that", classPtrType->IrType()), memberVar->Index(), memberVar->GetType()->IrType()));
+            Llvm::Ir::MemberVarPtr right(new Llvm::Ir::MemberVar(memberVar->Name(), Llvm::Ir::CreateParameter("that", classPtrType->IrType()), memberVar->GetIndex(), memberVar->GetType()->IrType()));
             memberResult.AddObject(isClassType ? right->CreateAddr(ir, memberVar->GetType()->IrType()) : right);
             ir.SetNextInstructionComment(memberAssignmentCalls[i]->ToString());
             memberAssignmentCalls[i]->Generate(ir, memberResult);
@@ -900,7 +900,7 @@
                 GenResult memberResult(ir, flags);
                 MemberVariablePtr memberVar = memberVars[i];
                 bool isClassType = memberVar->GetType()->IsClassType();
-                Llvm::Ir::MemberVarPtr mv(new Llvm::Ir::MemberVar(memberVar->Name(), thisPtr, memberVar->Index(), memberVar->GetType()->IrType()));
+                Llvm::Ir::MemberVarPtr mv(new Llvm::Ir::MemberVar(memberVar->Name(), thisPtr, memberVar->GetIndex(), memberVar->GetType()->IrType()));
                 ir.SetNextInstructionComment(memberVar->FullName());
                 memberResult.AddObject(isClassType ? mv->CreateAddr(ir, mv->GetType()) : mv);
                 ir.SetNextInstructionComment(memberDestructorCalls[i]->ToString());