Clean unnecessary code, add direction threshold as a variable

Cleaning parts of the code that are not needed + adding a "direction threshold" as a variable.
Add "use strict", add "ws" as a var, add "window" prefix for Web Socket Object

"Use strict" + some other, minor updates
Update threshold

Updated threshold to master branch default: 0.9
Redesign event capturing

Made even further modifications. This made user experience better since all the swipe events are captured and the "best" is compared to the threshold.
Merge pull request #1 from zvona/master

Code cleanup from unnecessary if statements, adds "use strict" + variable reference enhancements.