Fix #46: Improve key functions.
3 files changed