Small refactoring + improvement
Merge pull request #122 from kaysoky/SYNR-639

Bit of refactoring