Refactored ExerciseDAO, ExerciseService and related classes, tests etc.

Refactored ExerciseDAO, ExerciseService and related classes, tests etc.