add optimization where we remove:  up/down, left/right, right/left, down/up pairs
Merge remote-tracking branch 'origin/master'