Refactor getKeyword and putKeyword! to be more generic

This will make it easier to get and put keywords that are not strings,
which will be implemented as soon as I need it (ie. not yet)