keyup and keydown events, clean out some crap