Index: src/main/java/com/wediscussmovies/project/web/controller/DiscussionsController.java
===================================================================
--- src/main/java/com/wediscussmovies/project/web/controller/DiscussionsController.java	(revision 7fafeade7bf35835297971768f9dc93f768c1ff0)
+++ src/main/java/com/wediscussmovies/project/web/controller/DiscussionsController.java	(revision 3ded84dfbf8ff25bf27cc822ac97b84a063fa95a)
@@ -2,5 +2,5 @@
 
 import com.wediscussmovies.project.model.*;
-import com.wediscussmovies.project.model.enumerations.DiscussionType;
+
 import com.wediscussmovies.project.service.DiscussionService;
 import com.wediscussmovies.project.service.MovieService;
@@ -14,5 +14,4 @@
 import java.sql.Date;
 import java.time.LocalDate;
-import java.util.ArrayList;
 import java.util.List;
 import java.util.Optional;
@@ -80,6 +79,6 @@
         if(discussion.isEmpty())
             return "redirect:/discussions";
-        Reply reply = new Reply(discussion.get(), user, date, text);
-        replyService.save(reply);
+        //Reply reply = new Reply(discussion.get(), user, date, text);
+       // replyService.save(reply);
         return "redirect:/discussions/"+id;
     }
@@ -103,11 +102,11 @@
             return "redirect:/login";
         }
-        Long movie_id = (Long) request.getSession().getAttribute("movieId");
+        Integer movie_id = (Integer) request.getSession().getAttribute("movieId");
         request.getSession().setAttribute("movieId", null);
         Optional<Movie> movieOp = movieService.findById(movie_id);
         if(movieOp.isEmpty())
             return "redirect:/movies";
-        Discussion discussion = new Discussion(DiscussionType.M,text, title, Date.valueOf(LocalDate.now()),user,movieOp.get(),null,new ArrayList<>());
-        discussionService.save(discussion);
+      //  Discussion discussion = new Discussion('M',text, title, Date.valueOf(LocalDate.now()),user,movieOp.get(),null);
+       // discussionService.save(discussion);
         return "redirect:/discussions";
     }
@@ -137,6 +136,7 @@
         if(personOp.isEmpty())
             return "redirect:/discussions";
-        Discussion discussion = new Discussion(DiscussionType.P,title, text,Date.valueOf(LocalDate.now()),user,null,personOp.get(),new ArrayList<>());
-        discussionService.save(discussion);
+
+      //  Discussion discussion = new Discussion('P',title, text,Date.valueOf(LocalDate.now()),user,null,personOp.get());
+      //  discussionService.save(discussion);
         return "redirect:/discussions";
     }
Index: src/main/java/com/wediscussmovies/project/web/controller/MovieController.java
===================================================================
--- src/main/java/com/wediscussmovies/project/web/controller/MovieController.java	(revision 7fafeade7bf35835297971768f9dc93f768c1ff0)
+++ src/main/java/com/wediscussmovies/project/web/controller/MovieController.java	(revision 3ded84dfbf8ff25bf27cc822ac97b84a063fa95a)
@@ -2,7 +2,6 @@
 
 import com.wediscussmovies.project.exception.MovieIdNotFoundException;
-import com.wediscussmovies.project.model.Genre;
-import com.wediscussmovies.project.model.Movie;
-import com.wediscussmovies.project.model.Person;
+import com.wediscussmovies.project.model.*;
+
 import com.wediscussmovies.project.service.GenreService;
 import com.wediscussmovies.project.service.MovieService;
@@ -33,5 +32,5 @@
     public String getMovies(@RequestParam(required = false) String titleQuery, Model model){
         List<Movie> movies;
-        if(titleQuery == null || titleQuery.isEmpty()) {
+        if(titleQuery == null ) {
             movies = movieService.listAll();
         }
@@ -40,9 +39,8 @@
         }
 
-        movies.sort(Movie.comparatorTitle);
 
         model.addAttribute("movies", movies);
         model.addAttribute("contentTemplate", "moviesList");
-        return "template";
+        return "list";
     }
 
@@ -59,8 +57,8 @@
 
     @PostMapping("/{id}/delete")
-    public String addMovie(@PathVariable Long id){
+    public String addMovie(@PathVariable Integer id){
         Optional<Movie> movie = movieService.findById(id);
         if(movie.isPresent()){
-            movieService.deleteById(movie.get().getId());
+            movieService.deleteById(movie.get().getMovieId());
         }
         return "redirect:/movies";
@@ -122,5 +120,5 @@
 
         Movie movie = new Movie(title, description, image_url, airing_date,
-                    rating, director, actorsList, genreList);
+                    rating, director.getPersonId());
 
         movieService.save(movie);
@@ -131,5 +129,5 @@
     @PostMapping("/edit/confirm")
     public String editMoviePost(
-                                @RequestParam Long movie_id,
+                                @RequestParam Integer movie_id,
                                 @RequestParam String title,
                                @RequestParam String description,
@@ -198,12 +196,12 @@
         movieService.deleteById(movie_id);
 
-        movie.setActors(actorsList);
-        movie.setDirector(director);
-        movie.setGenres(genreList);
-        movie.setTitle(title);
-        movie.setDescription(description);
-        movie.setAringDate(airing_date);
-        movie.setImageUrl(image_url);
-        movie.setImbdRating(rating);
+//      //  movie.setActors(actorsList);
+//        movie.setDirector(director);
+//        movie.setGenres(genreList);
+//        movie.setTitle(title);
+//        movie.setDescription(description);
+//        movie.setAringDate(airing_date);
+//        movie.setImageUrl(image_url);
+//        movie.setImbdRating(rating);
 
         movieService.save(movie);
@@ -213,5 +211,5 @@
 
     @GetMapping("/{id}/edit")
-    public String editMovie(@PathVariable Long id, Model model){
+    public String editMovie(@PathVariable Integer id, Model model){
         Movie movie = movieService.findById(id).orElseThrow(() -> new MovieIdNotFoundException(id));
         model.addAttribute("directors", personService.findAllDirectors());
Index: src/main/java/com/wediscussmovies/project/web/controller/PersonsController.java
===================================================================
--- src/main/java/com/wediscussmovies/project/web/controller/PersonsController.java	(revision 7fafeade7bf35835297971768f9dc93f768c1ff0)
+++ src/main/java/com/wediscussmovies/project/web/controller/PersonsController.java	(revision 3ded84dfbf8ff25bf27cc822ac97b84a063fa95a)
@@ -1,5 +1,5 @@
 package com.wediscussmovies.project.web.controller;
 
-import com.wediscussmovies.project.model.Person;
+import com.wediscussmovies.project.model.*;
 import com.wediscussmovies.project.model.enumerations.PersonType;
 import com.wediscussmovies.project.service.PersonService;
@@ -15,5 +15,4 @@
 
 @Controller
-@RequestMapping(".")
 public class PersonsController {
     private final PersonService personSerivce;
@@ -101,5 +100,5 @@
             @RequestParam String name,
             @RequestParam String surname,
-            @RequestParam PersonType type,
+            @RequestParam Character type,
             @RequestParam Date date_of_birth,
             @RequestParam String image_url,
@@ -108,5 +107,5 @@
         if(personSerivce.save(person)){
             String toWhere = "actors";
-            if(type == PersonType.D)
+            //if(type == PersonType.D)
                 toWhere = "directors";
             return "redirect:/"+toWhere;
Index: src/main/java/com/wediscussmovies/project/web/controller/ReplyController.java
===================================================================
--- src/main/java/com/wediscussmovies/project/web/controller/ReplyController.java	(revision 7fafeade7bf35835297971768f9dc93f768c1ff0)
+++ src/main/java/com/wediscussmovies/project/web/controller/ReplyController.java	(revision 3ded84dfbf8ff25bf27cc822ac97b84a063fa95a)
@@ -1,6 +1,7 @@
 package com.wediscussmovies.project.web.controller;
 
-import com.wediscussmovies.project.model.Reply;
+import com.wediscussmovies.project.model.*;
 import com.wediscussmovies.project.service.ReplyService;
+import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -11,4 +12,5 @@
 import java.util.Optional;
 
+@Controller
 public class ReplyController {
     private final ReplyService replyService;
@@ -37,5 +39,5 @@
         reply.setText(text);
         replyService.save(reply);
-        return "redirect:/discussions/"+reply.getDiscussion().getId();
+        return "redirect:/discussions/"+reply.getDiscussionId();
     }
 }
Index: src/main/java/com/wediscussmovies/project/web/controller/UserController.java
===================================================================
--- src/main/java/com/wediscussmovies/project/web/controller/UserController.java	(revision 7fafeade7bf35835297971768f9dc93f768c1ff0)
+++ 	(revision )
@@ -1,100 +1,0 @@
-package com.wediscussmovies.project.web.controller;
-
-import com.wediscussmovies.project.model.PasswordEncoder;
-import com.wediscussmovies.project.model.User;
-import com.wediscussmovies.project.model.exception.InvalidUserCredentialsException;
-import com.wediscussmovies.project.service.UserService;
-import org.springframework.stereotype.Controller;
-import org.springframework.ui.Model;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-
-import javax.servlet.http.HttpServletRequest;
-import java.security.NoSuchAlgorithmException;
-import java.util.Optional;
-
-@Controller
-@RequestMapping("/")
-public class UserController {
-    private final UserService userService;
-
-    public UserController(UserService userService) {
-        this.userService = userService;
-    }
-
-    @GetMapping("/login")
-    public String getLoginPage(Model model){
-        return "login";
-    }
-
-    @PostMapping("/login/confirm")
-    public String confirmLogin(HttpServletRequest request, Model model,
-                               @RequestParam String username,
-                               @RequestParam String password){
-        Optional<User> user;
-        try{
-            password = PasswordEncoder.getEncodedPasswordString(password);
-        }
-        catch (NoSuchAlgorithmException ex){
-            model.addAttribute("hasError", true);
-            model.addAttribute("error", ex.getMessage());
-            return "login";
-        }
-
-        try{
-            user = this.userService.login(username, password);
-            request.getSession().setAttribute("user", user);
-            request.getSession().setAttribute("loggedIn",true);
-            return "redirect:/movies";
-        }
-        catch (InvalidUserCredentialsException ex){
-            model.addAttribute("hasError", true);
-            model.addAttribute("error", ex.getMessage());
-            return "login";
-        }
-    }
-
-    @GetMapping("/register")
-    public String getRegisterPage(){
-        return "register";
-    }
-
-    @PostMapping("/login/confirm")
-    public String confirmRegister(HttpServletRequest request,
-                                  @RequestParam String username,
-                                  @RequestParam String email,
-                                  @RequestParam String password,
-                                  @RequestParam String confirmPassword,
-                                  @RequestParam String name,
-                                  @RequestParam String surname){
-        Optional<User> user;
-
-        try{
-            password = PasswordEncoder.getEncodedPasswordString(password);
-            confirmPassword = PasswordEncoder.getEncodedPasswordString(confirmPassword);
-        }
-        catch (NoSuchAlgorithmException ex){
-            request.getSession().setAttribute("error", "Contact the administrators!");
-            request.getSession().setAttribute("hasError", "true");
-            return "redirect:/movies";
-        }
-
-        user = this.userService.register(request, email, password, confirmPassword, username, name, surname);
-        if(user.isEmpty()){
-            request.setAttribute("hasError", "true");
-        }else{
-            request.getSession().setAttribute("hasError", "false");
-            request.getSession().setAttribute("user", user.get());
-            request.getSession().setAttribute("loggedIn",true);
-        }
-        return "redirect:/movies";
-    }
-
-    @GetMapping
-    public String logout(HttpServletRequest request){
-        request.getSession().invalidate();
-        return "redirect:/login";
-    }
-}
Index: src/main/java/com/wediscussmovies/project/web/controller/UsersController.java
===================================================================
--- src/main/java/com/wediscussmovies/project/web/controller/UsersController.java	(revision 3ded84dfbf8ff25bf27cc822ac97b84a063fa95a)
+++ src/main/java/com/wediscussmovies/project/web/controller/UsersController.java	(revision 3ded84dfbf8ff25bf27cc822ac97b84a063fa95a)
@@ -0,0 +1,98 @@
+//package com.wediscussmovies.project.web.controller;
+//
+//import com.wediscussmovies.project.model.PasswordEncoder;
+//import com.wediscussmovies.project.model.*;
+//import com.wediscussmovies.project.model.exception.InvalidUserCredentialsException;
+//import com.wediscussmovies.project.service.UserService;
+//import org.springframework.stereotype.Controller;
+//import org.springframework.ui.Model;
+//import org.springframework.web.bind.annotation.GetMapping;
+//import org.springframework.web.bind.annotation.PostMapping;
+//import org.springframework.web.bind.annotation.RequestParam;
+//
+//import javax.servlet.http.HttpServletRequest;
+//import java.security.NoSuchAlgorithmException;
+//import java.util.Optional;
+//
+//@Controller
+//public class UsersController{
+//    private final UserService userService;
+//
+//    public UsersController(UserService userService) {
+//        this.userService = userService;
+//    }
+//
+//    @GetMapping("/login")
+//    public String getLoginPage(Model model){
+//        return "login";
+//    }
+//
+//    @PostMapping("/login/confirm")
+//    public String confirmLogin(HttpServletRequest request, Model model,
+//                               @RequestParam String username,
+//                               @RequestParam String password){
+//        Optional<User> user;
+//        try{
+//            password = PasswordEncoder.getEncodedPasswordString(password);
+//        }
+//        catch (NoSuchAlgorithmException ex){
+//            model.addAttribute("hasError", true);
+//            model.addAttribute("error", ex.getMessage());
+//            return "login";
+//        }
+//
+//        try{
+//            user = this.userService.login(username, password);
+//            request.getSession().setAttribute("user", user);
+//            request.getSession().setAttribute("loggedIn",true);
+//            return "redirect:/movies";
+//        }
+//        catch (InvalidUserCredentialsException ex){
+//            model.addAttribute("hasError", true);
+//            model.addAttribute("error", ex.getMessage());
+//            return "login";
+//        }
+//    }
+//
+//    @GetMapping("/register")
+//    public String getRegisterPage(){
+//        return "register";
+//    }
+//
+//    @PostMapping("/login/confirm")
+//    public String confirmRegister(HttpServletRequest request,
+//                                  @RequestParam String username,
+//                                  @RequestParam String email,
+//                                  @RequestParam String password,
+//                                  @RequestParam String confirmPassword,
+//                                  @RequestParam String name,
+//                                  @RequestParam String surname){
+//        Optional<User> user;
+//
+//        try{
+//            password = PasswordEncoder.getEncodedPasswordString(password);
+//            confirmPassword = PasswordEncoder.getEncodedPasswordString(confirmPassword);
+//        }
+//        catch (NoSuchAlgorithmException ex){
+//            request.getSession().setAttribute("error", "Contact the administrators!");
+//            request.getSession().setAttribute("hasError", "true");
+//            return "redirect:/movies";
+//        }
+//
+//        user = this.userService.register(request, email, password, confirmPassword, username, name, surname);
+//        if(user.isEmpty()){
+//            request.setAttribute("hasError", "true");
+//        }else{
+//            request.getSession().setAttribute("hasError", "false");
+//            request.getSession().setAttribute("user", user.get());
+//            request.getSession().setAttribute("loggedIn",true);
+//        }
+//        return "redirect:/movies";
+//    }
+//
+//    @GetMapping
+//    public String logout(HttpServletRequest request){
+//        request.getSession().invalidate();
+//        return "redirect:/login";
+//    }
+//}
