code clean-up and added a global rest error handler (@ControllerAdvice)