cleaning up the leapmotion input stuff to extract it as a shared component