Abstract all the functionality used by Hokeys.js

Progress on #121