Refactored to have DRY code for handling button down and button up.
Merge branch 'dev' of https://github.com/ayc92/PresentPerfect into dev