Merge pull request #2 from jarvischung/master

Updated control flow.
code clean and add comment.
increase long press accuracy.
Merge pull request #4 from weikunlu/master

merge