tidied keyup and made currentLastIndex private variable