Fixes #14 : minor refactoring