Improve gestures handling

Improve gestures handling in general and add brightness managing.