code factorized + default value returned if a param is set, but empty
spaces removed
Merge branch 'getParam_fix'