Put some logic about parameters parsing and validation in dedicated helpers. Fix #9 Fix #10