Refactor and add repos and EF code