Added enclosing braces around if statements
Moved @Transactional annotation to the service impl