Refactoring and separated devices parameter to be set from outside