remove unnecessary variables from gesture plugin and other cleanups