Break out keytable to `lib/keytable.js`