Cleaning up keyboard patch