Refactoring gesture recognizer