Cleanups

Also submitted upstream: https://code.google.com/p/wifikeyboard/issues/detail?id=93