refactoring of variables

add comments to paired device names
use local variables instead of fields
change naming of variables
refactoring variables