Code refactoring
Merge pull request #4 from wcandillon/locktarget

Code refactoring