Working on entities repository

Compileable version;
Finished working on repository, divided entity controller