Refactored code
Fixed typo
Merge pull request #81 from sylvaindeloux/refactor_code

Refactored code
Fixed return value
Merge pull request #83 from sylvaindeloux/refactor_code

Fixed return value
Merge branch 'sonata/master'