simple refactoring
device discovering optimization
for close #10

fix bug with incorrect time calculation after paste operation