refactored out the hammer code to touch_controller.js