Index: src/main/java/it/finki/tinki/bootstrap/DataHolder.java
===================================================================
--- src/main/java/it/finki/tinki/bootstrap/DataHolder.java	(revision 509cb956bf2b3a456ea102e01dac170e0d7c6879)
+++ src/main/java/it/finki/tinki/bootstrap/DataHolder.java	(revision a8e8545fbb925011b0c4a0caca431f75dd992361)
@@ -2,9 +2,18 @@
 
 import it.finki.tinki.model.Address;
+import it.finki.tinki.model.EmbeddedMatchId;
+import it.finki.tinki.model.Jobs.Job;
+import it.finki.tinki.model.Jobs.Work;
+import it.finki.tinki.model.Match;
 import it.finki.tinki.model.Skill;
+import it.finki.tinki.model.Users.Account;
 import it.finki.tinki.model.Users.Company;
 import it.finki.tinki.model.Users.User;
 import it.finki.tinki.model.enumerator.AccountType;
+import it.finki.tinki.model.enumerator.WorkType;
 import it.finki.tinki.repository.*;
+import it.finki.tinki.service.AccountService;
+import it.finki.tinki.service.WorkService;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
@@ -17,15 +26,16 @@
 
     SkillRepository skillRepository;
-    UserRepository userRepository;
-    CompanyRepository companyRepository;
-    TeamRepository teamRepository;
-    AddressRepository addressRepository;
+    AccountService accountService;
+    WorkService workService;
+    MatchRepository matchRepository;
 
-    public DataHolder(SkillRepository skillRepository, UserRepository userRepository, CompanyRepository companyRepository, TeamRepository teamRepository, AddressRepository addressRepository) {
+    public DataHolder(SkillRepository skillRepository,
+                      AccountService accountService,
+                      WorkService workService,
+                      MatchRepository matchRepository) {
         this.skillRepository = skillRepository;
-        this.userRepository = userRepository;
-        this.companyRepository = companyRepository;
-        this.teamRepository = teamRepository;
-        this.addressRepository = addressRepository;
+        this.accountService = accountService;
+        this.workService = workService;
+        this.matchRepository = matchRepository;
     }
 
@@ -59,8 +69,15 @@
         lista = skillRepository.findAll();
 
-        userRepository.save(new User("asdf", "asdf", "Zoki", AccountType.USER, "Poki", lista, lista));
+        List<Long> ids = new ArrayList<>();
+        lista.forEach(item -> {
+            ids.add(item.getId());
+        });
 
-        addressRepository.save(new Address("asdf", "asdf", "asdf"));
-        companyRepository.save(new Company("asdf@asdf", "pass", "Co.co", AccountType.COMPANY, addressRepository.findAll().get(0)));
+        Account c = this.accountService.registerCompany("asdf@asdf", "pass", "Co.co", "Macedonia", "Skopje", "Pero Nakov");
+
+        Job j = this.workService.insertJob("Asdf", "Asdfa", c.getId() ,5000, ids, AccountType.COMPANY);
+
+        Account u = this.accountService.registerUser("asdf", "asdf", "Zoki", "Poki", lista, lista);
+
     }
 
Index: src/main/java/it/finki/tinki/model/EmbeddedMatchId.java
===================================================================
--- src/main/java/it/finki/tinki/model/EmbeddedMatchId.java	(revision 509cb956bf2b3a456ea102e01dac170e0d7c6879)
+++ src/main/java/it/finki/tinki/model/EmbeddedMatchId.java	(revision a8e8545fbb925011b0c4a0caca431f75dd992361)
@@ -6,6 +6,8 @@
 
 import javax.persistence.Embeddable;
+import javax.persistence.FetchType;
 import javax.persistence.OneToOne;
 import java.io.Serializable;
+import java.util.Objects;
 
 @Embeddable
@@ -25,4 +27,3 @@
         this.user = user;
     }
-
 }
Index: src/main/java/it/finki/tinki/model/Jobs/Internship.java
===================================================================
--- src/main/java/it/finki/tinki/model/Jobs/Internship.java	(revision 509cb956bf2b3a456ea102e01dac170e0d7c6879)
+++ src/main/java/it/finki/tinki/model/Jobs/Internship.java	(revision a8e8545fbb925011b0c4a0caca431f75dd992361)
@@ -12,5 +12,5 @@
 public class Internship extends Work {
 
-    @ManyToMany
+    @ManyToMany(fetch = FetchType.EAGER)
     List<Skill> skillsTrained;
 
Index: src/main/java/it/finki/tinki/model/Jobs/Job.java
===================================================================
--- src/main/java/it/finki/tinki/model/Jobs/Job.java	(revision 509cb956bf2b3a456ea102e01dac170e0d7c6879)
+++ src/main/java/it/finki/tinki/model/Jobs/Job.java	(revision a8e8545fbb925011b0c4a0caca431f75dd992361)
@@ -12,5 +12,5 @@
 public class Job extends Work {
 
-    @ManyToMany
+    @ManyToMany(fetch = FetchType.EAGER)
     List<Skill> skillsRequired;
 
Index: src/main/java/it/finki/tinki/model/Jobs/Project.java
===================================================================
--- src/main/java/it/finki/tinki/model/Jobs/Project.java	(revision 509cb956bf2b3a456ea102e01dac170e0d7c6879)
+++ src/main/java/it/finki/tinki/model/Jobs/Project.java	(revision a8e8545fbb925011b0c4a0caca431f75dd992361)
@@ -13,5 +13,5 @@
 public class Project extends Work {
 
-    @ManyToMany
+    @ManyToMany(fetch = FetchType.EAGER)
     List<Skill> skillsRequired;
 
Index: src/main/java/it/finki/tinki/model/Match.java
===================================================================
--- src/main/java/it/finki/tinki/model/Match.java	(revision 509cb956bf2b3a456ea102e01dac170e0d7c6879)
+++ src/main/java/it/finki/tinki/model/Match.java	(revision a8e8545fbb925011b0c4a0caca431f75dd992361)
@@ -1,4 +1,7 @@
 package it.finki.tinki.model;
 
+import com.sun.istack.NotNull;
+import it.finki.tinki.model.Jobs.Work;
+import it.finki.tinki.model.Users.User;
 import it.finki.tinki.model.enumerator.WorkType;
 import lombok.Data;
@@ -10,6 +13,16 @@
 public class Match {
 
+//    @Id
+//    @GeneratedValue(strategy = GenerationType.AUTO)
+//    Long id;
+//
+//    @NotNull
+//    Long workId;
+//
+//    @NotNull
+//    Long userId;
+
     @Id
-    EmbeddedMatchId combinedId;
+    EmbeddedMatchId embeddedMatchId;
 
     float coefficient;
@@ -19,6 +32,13 @@
     public Match(){}
 
+//    public Match(Long workId, Long userId, float coefficient, WorkType type) {
+//        this.workId = workId;
+//        this.userId = userId;
+//        this.coefficient = coefficient;
+//        this.type = type;
+//    }
+
     public Match(EmbeddedMatchId embeddedMatchId, float coefficient, WorkType type) {
-        this.combinedId = embeddedMatchId;
+        this.embeddedMatchId = embeddedMatchId;
         this.coefficient = coefficient;
         this.type = type;
Index: src/main/java/it/finki/tinki/repository/MatchRepository.java
===================================================================
--- src/main/java/it/finki/tinki/repository/MatchRepository.java	(revision 509cb956bf2b3a456ea102e01dac170e0d7c6879)
+++ src/main/java/it/finki/tinki/repository/MatchRepository.java	(revision a8e8545fbb925011b0c4a0caca431f75dd992361)
@@ -1,4 +1,5 @@
 package it.finki.tinki.repository;
 
+import it.finki.tinki.model.EmbeddedMatchId;
 import it.finki.tinki.model.Match;
 import it.finki.tinki.model.Users.User;
@@ -10,5 +11,6 @@
 
 @Repository
-public interface MatchRepository extends JpaRepository<Match, Long> {
-    List<Match> getAllByCombinedId_User_IdAndTypeOrderByCoefficientDesc(Long uId, WorkType type);
+public interface MatchRepository extends JpaRepository<Match, EmbeddedMatchId> {
+    List<Match> getAllByEmbeddedMatchIdUserAndTypeOrderByCoefficientDesc(Long uId, WorkType type);
+//    List<Match> getAllByUserIdAndTypeOrderByCoefficientDesc(Long uId, WorkType type);
 }
Index: src/main/java/it/finki/tinki/service/SkillService.java
===================================================================
--- src/main/java/it/finki/tinki/service/SkillService.java	(revision 509cb956bf2b3a456ea102e01dac170e0d7c6879)
+++ src/main/java/it/finki/tinki/service/SkillService.java	(revision a8e8545fbb925011b0c4a0caca431f75dd992361)
@@ -6,4 +6,4 @@
 
 public interface SkillService {
-    List<Skill> returnSkillsBasedOnId(List<Integer> skillIds);
+    List<Skill> returnSkillsBasedOnId(List<Long> skillIds);
 }
Index: src/main/java/it/finki/tinki/service/WorkService.java
===================================================================
--- src/main/java/it/finki/tinki/service/WorkService.java	(revision 509cb956bf2b3a456ea102e01dac170e0d7c6879)
+++ src/main/java/it/finki/tinki/service/WorkService.java	(revision a8e8545fbb925011b0c4a0caca431f75dd992361)
@@ -16,6 +16,6 @@
     List<Internship> getAllInternships();
     List<Project> getAllProjects();
-    Job insertJob(String title, String description, Long accId, int salary, List<Integer> skillsRequired, AccountType type);
-    Internship insertInternship(String title, String description, Long adccId, int salary, List<Integer> skillsTrained, int openSpots, AccountType type);
-    Project insertProject(String title, String description, Long adccId, int salary, List<Integer> skillsRequired, Date validUntil, AccountType type);
+    Job insertJob(String title, String description, Long accId, int salary, List<Long> skillsRequired, AccountType type);
+    Internship insertInternship(String title, String description, Long adccId, int salary, List<Long> skillsTrained, int openSpots, AccountType type);
+    Project insertProject(String title, String description, Long adccId, int salary, List<Long> skillsRequired, Date validUntil, AccountType type);
 }
Index: src/main/java/it/finki/tinki/service/impl/AccountServiceImpl.java
===================================================================
--- src/main/java/it/finki/tinki/service/impl/AccountServiceImpl.java	(revision 509cb956bf2b3a456ea102e01dac170e0d7c6879)
+++ src/main/java/it/finki/tinki/service/impl/AccountServiceImpl.java	(revision a8e8545fbb925011b0c4a0caca431f75dd992361)
@@ -2,4 +2,7 @@
 
 import it.finki.tinki.model.Address;
+import it.finki.tinki.model.Jobs.Internship;
+import it.finki.tinki.model.Jobs.Job;
+import it.finki.tinki.model.Jobs.Project;
 import it.finki.tinki.model.Skill;
 import it.finki.tinki.model.Users.Account;
@@ -10,9 +13,8 @@
 import it.finki.tinki.model.exception.InvalidArgumentsException;
 import it.finki.tinki.model.exception.UserExistsException;
-import it.finki.tinki.repository.AddressRepository;
-import it.finki.tinki.repository.CompanyRepository;
-import it.finki.tinki.repository.TeamRepository;
-import it.finki.tinki.repository.UserRepository;
+import it.finki.tinki.repository.*;
 import it.finki.tinki.service.AccountService;
+import it.finki.tinki.service.MatchmakerService;
+import it.finki.tinki.service.WorkService;
 import org.springframework.stereotype.Service;
 
@@ -28,10 +30,25 @@
     TeamRepository teamRepository;
     CompanyRepository companyRepository;
+    JobRepository jobRepository;
+    ProjectRepository projectRepository;
+    InternshipRepository internshipRepository;
+    MatchmakerService matchmakerService;
 
-    public AccountServiceImpl(AddressRepository addressRepository, UserRepository userRepository, TeamRepository teamRepository, CompanyRepository companyRepository) {
+    public AccountServiceImpl(AddressRepository addressRepository,
+                              UserRepository userRepository,
+                              TeamRepository teamRepository,
+                              CompanyRepository companyRepository,
+                              MatchmakerService matchmakerService,
+                              JobRepository jobRepository,
+                              ProjectRepository projectRepository,
+                              InternshipRepository internshipRepository) {
         this.addressRepository = addressRepository;
         this.userRepository = userRepository;
         this.teamRepository = teamRepository;
         this.companyRepository = companyRepository;
+        this.jobRepository = jobRepository;
+        this.projectRepository = projectRepository;
+        this.internshipRepository = internshipRepository;
+        this.matchmakerService = matchmakerService;
     }
 
@@ -65,5 +82,29 @@
 
         User u = new User(email, password, name, AccountType.USER, surname, retainedSkills, skillsToLearn);
-        return this.userRepository.save(u);
+        User ru = this.userRepository.save(u);
+
+        List<Job> jobs = this.jobRepository.findAll();
+        List<Project> projects = this.projectRepository.findAll();
+        List<Internship> internships = this.internshipRepository.findAll();
+
+        if(jobs.size()!=0){
+            for (Job job : jobs) {
+                this.matchmakerService.setUpUserJobMatches(job, u);
+            }
+        }
+
+        if(projects.size()!=0){
+            for (Project project : projects) {
+                this.matchmakerService.setUpUserProjectMatches(project, u);
+            }
+        }
+
+        if(internships.size()!=0){
+            for(Internship internship : internships){
+                this.matchmakerService.setUpUserInternshipMatches(internship, u);
+            }
+        }
+
+        return ru;
     }
 
Index: src/main/java/it/finki/tinki/service/impl/MatchmakerServiceImpl.java
===================================================================
--- src/main/java/it/finki/tinki/service/impl/MatchmakerServiceImpl.java	(revision 509cb956bf2b3a456ea102e01dac170e0d7c6879)
+++ src/main/java/it/finki/tinki/service/impl/MatchmakerServiceImpl.java	(revision a8e8545fbb925011b0c4a0caca431f75dd992361)
@@ -11,5 +11,8 @@
 import it.finki.tinki.model.Users.User;
 import it.finki.tinki.model.enumerator.WorkType;
+import it.finki.tinki.repository.InternshipRepository;
+import it.finki.tinki.repository.JobRepository;
 import it.finki.tinki.repository.MatchRepository;
+import it.finki.tinki.repository.ProjectRepository;
 import it.finki.tinki.service.MatchmakerService;
 import org.springframework.stereotype.Service;
@@ -23,16 +26,27 @@
 
     MatchRepository matchRepository;
+    JobRepository jobRepository;
+    InternshipRepository internshipRepository;
+    ProjectRepository projectRepository;
 
-    public MatchmakerServiceImpl(MatchRepository matchRepository) {
+    public MatchmakerServiceImpl(MatchRepository matchRepository,
+                                 JobRepository jobRepository,
+                                 InternshipRepository internshipRepository,
+                                 ProjectRepository projectRepository) {
         this.matchRepository = matchRepository;
+        this.jobRepository = jobRepository;
+        this.internshipRepository = internshipRepository;
+        this.projectRepository = projectRepository;
     }
 
     @Override
     public List<Internship> getMatchingInternshipsForUser(User user) {
-        List<Match> matches = this.matchRepository.getAllByCombinedId_User_IdAndTypeOrderByCoefficientDesc(user.getId(), WorkType.INTERNSHIP);
+        List<Match> matches = this.matchRepository.getAllByEmbeddedMatchIdUserAndTypeOrderByCoefficientDesc(user.getId(), WorkType.INTERNSHIP);
+//        List<Match> matches = this.matchRepository.getAllByUserIdAndTypeOrderByCoefficientDesc(user.getId(), WorkType.INTERNSHIP);
 
         List<Internship> internships = new ArrayList<>();
         matches.forEach(match -> {
-            internships.add((Internship) match.getCombinedId().getWork());
+            internships.add((Internship) match.getEmbeddedMatchId().getWork());
+//            internships.add(this.internshipRepository.findById(match.getWorkId()).get());
         });
 
@@ -42,9 +56,11 @@
     @Override
     public List<Job> getMatchingJobsForUser(User user) {
-        List<Match> matches = this.matchRepository.getAllByCombinedId_User_IdAndTypeOrderByCoefficientDesc(user.getId(), WorkType.JOB);
+        List<Match> matches = this.matchRepository.getAllByEmbeddedMatchIdUserAndTypeOrderByCoefficientDesc(user.getId(), WorkType.INTERNSHIP);
+//        List<Match> matches = this.matchRepository.getAllByUserIdAndTypeOrderByCoefficientDesc(user.getId(), WorkType.JOB);
 
         List<Job> jobs = new ArrayList<>();
         matches.forEach(match -> {
-            jobs.add((Job) match.getCombinedId().getWork());
+            jobs.add((Job) match.getEmbeddedMatchId().getWork());
+//            jobs.add(this.jobRepository.findById(match.getWorkId()).get());
         });
 
@@ -54,9 +70,11 @@
     @Override
     public List<Project> getMatchingProjectsForUser(User user) {
-        List<Match> matches = this.matchRepository.getAllByCombinedId_User_IdAndTypeOrderByCoefficientDesc(user.getId(), WorkType.PROJECT);
+        List<Match> matches = this.matchRepository.getAllByEmbeddedMatchIdUserAndTypeOrderByCoefficientDesc(user.getId(), WorkType.INTERNSHIP);
+//        List<Match> matches = this.matchRepository.getAllByUserIdAndTypeOrderByCoefficientDesc(user.getId(), WorkType.PROJECT);
 
         List<Project> projects = new ArrayList<>();
         matches.forEach(match -> {
-            projects.add((Project) match.getCombinedId().getWork());
+            projects.add((Project) match.getEmbeddedMatchId().getWork());
+//            projects.add(this.projectRepository.findById(match.getWorkId()).get());
         });
 
@@ -72,6 +90,7 @@
 
         if(coef!=0){
-            EmbeddedMatchId matchId = new EmbeddedMatchId(job, user);
-            Match m = new Match(matchId, coef, WorkType.JOB);
+            EmbeddedMatchId embeddedMatchId = new EmbeddedMatchId(job, user);
+            Match m = new Match(embeddedMatchId, coef, WorkType.JOB);
+//            Match m = new Match(job.getId(), user.getId(), coef, WorkType.JOB);
             this.matchRepository.save(m);
         }
@@ -86,6 +105,7 @@
 
         if(coef!=0){
-            EmbeddedMatchId matchId = new EmbeddedMatchId(project, user);
-            Match m = new Match(matchId, coef, WorkType.PROJECT);
+            EmbeddedMatchId embeddedMatchId = new EmbeddedMatchId(project, user);
+            Match m = new Match(embeddedMatchId, coef, WorkType.PROJECT);
+//            Match m = new Match(project.getId(), user.getId(), coef, WorkType.JOB);
             this.matchRepository.save(m);
         }
@@ -100,6 +120,7 @@
 
         if(coef!=0){
-            EmbeddedMatchId matchId = new EmbeddedMatchId(internship, user);
-            Match m = new Match(matchId, coef, WorkType.INTERNSHIP);
+            EmbeddedMatchId embeddedMatchId = new EmbeddedMatchId(internship, user);
+            Match m = new Match(embeddedMatchId, coef, WorkType.PROJECT);
+//            Match m = new Match(internship.getId(), user.getId(), coef, WorkType.JOB);
             this.matchRepository.save(m);
         }
Index: src/main/java/it/finki/tinki/service/impl/SkillServiceImpl.java
===================================================================
--- src/main/java/it/finki/tinki/service/impl/SkillServiceImpl.java	(revision 509cb956bf2b3a456ea102e01dac170e0d7c6879)
+++ src/main/java/it/finki/tinki/service/impl/SkillServiceImpl.java	(revision a8e8545fbb925011b0c4a0caca431f75dd992361)
@@ -20,10 +20,10 @@
 
     @Override
-    public List<Skill> returnSkillsBasedOnId(List<Integer> skillIds) {
+    public List<Skill> returnSkillsBasedOnId(List<Long> skillIds) {
 
         List<Skill> list = new ArrayList<>();
 
         skillIds.forEach(skill -> {
-            this.skillRepository.findById(Long.valueOf(skill)).ifPresent(list::add);
+            this.skillRepository.findById(skill).ifPresent(list::add);
         });
 
Index: src/main/java/it/finki/tinki/service/impl/WorkServiceImpl.java
===================================================================
--- src/main/java/it/finki/tinki/service/impl/WorkServiceImpl.java	(revision 509cb956bf2b3a456ea102e01dac170e0d7c6879)
+++ src/main/java/it/finki/tinki/service/impl/WorkServiceImpl.java	(revision a8e8545fbb925011b0c4a0caca431f75dd992361)
@@ -77,5 +77,5 @@
 
     @Override
-    public Job insertJob(String title, String description, Long adccId, int salary, List<Integer> skillsRequired, AccountType type) {
+    public Job insertJob(String title, String description, Long adccId, int salary, List<Long> skillsRequired, AccountType type) {
         List<Skill> skills = this.skillService.returnSkillsBasedOnId(skillsRequired);
         Account account = this.accountService.findByIdAndType(adccId, type);
@@ -85,5 +85,5 @@
 
     @Override
-    public Internship insertInternship(String title, String description, Long adccId, int salary, List<Integer> skillsTrained, int openSpots, AccountType type) {
+    public Internship insertInternship(String title, String description, Long adccId, int salary, List<Long> skillsTrained, int openSpots, AccountType type) {
         List<Skill> skills = this.skillService.returnSkillsBasedOnId(skillsTrained);
         Account account = this.accountService.findByIdAndType(adccId, type);
@@ -93,5 +93,5 @@
 
     @Override
-    public Project insertProject(String title, String description, Long adccId, int salary, List<Integer> skillsRequired, Date validUntil, AccountType type) {
+    public Project insertProject(String title, String description, Long adccId, int salary, List<Long> skillsRequired, Date validUntil, AccountType type) {
         List<Skill> skills = this.skillService.returnSkillsBasedOnId(skillsRequired);
         Account account = this.accountService.findByIdAndType(adccId, type);
Index: src/main/java/it/finki/tinki/web/controller/RegisterController.java
===================================================================
--- src/main/java/it/finki/tinki/web/controller/RegisterController.java	(revision 509cb956bf2b3a456ea102e01dac170e0d7c6879)
+++ src/main/java/it/finki/tinki/web/controller/RegisterController.java	(revision a8e8545fbb925011b0c4a0caca431f75dd992361)
@@ -40,6 +40,6 @@
                                              @RequestParam String name,
                                              @RequestParam String surname,
-                                             @RequestParam List<Integer> retainedSkills,
-                                             @RequestParam List<Integer> skillsToLearn){
+                                             @RequestParam List<Long> retainedSkills,
+                                             @RequestParam List<Long> skillsToLearn){
 
         List<Skill> retained = this.skillService.returnSkillsBasedOnId(retainedSkills);
@@ -53,20 +53,4 @@
             response.put("error", "There was an error when trying to register user.");
         }else{
-            List<Job> jobs = this.workService.getAllJobs();
-            List<Project> projects = this.workService.getAllProjects();
-            List<Internship> internships = this.workService.getAllInternships();
-
-            jobs.forEach(job -> {
-                this.matchmakerService.setUpUserJobMatches(job, (User) k);
-            });
-
-            projects.forEach(project -> {
-                this.matchmakerService.setUpUserProjectMatches(project, (User) k);
-            });
-
-            internships.forEach(internship -> {
-                this.matchmakerService.setUpUserInternshipMatches(internship, (User) k);
-            });
-
             response.put("success", "Registration completed successfully.");
         }
@@ -95,10 +79,10 @@
 
     @RequestMapping(path = "/company", method = RequestMethod.POST)
-    private Map<String, String> registerTeam(@RequestParam String email,
-                                             @RequestParam String password,
-                                             @RequestParam String name,
-                                             @RequestParam String country,
-                                             @RequestParam String city,
-                                             @RequestParam String street){
+    private Map<String, String> registeCompany(@RequestParam String email,
+                                               @RequestParam String password,
+                                               @RequestParam String name,
+                                               @RequestParam String country,
+                                               @RequestParam String city,
+                                               @RequestParam String street){
 
         Account k = this.accountService.registerCompany(email, password, name, country, city, street);
