Added IoC and fixed repo classes