Added unittests for Input and fixed checkPrevious always failing.
Merge branch 'hotfix/Input'