Refactoring of collision check handling
Merge remote-tracking branch 'origin/master'