Refactor keypressed; Add drop function