improved gesture detection from Remus
move device path to separate file