Handling invalid keys.

- Fixes #5.
Merge remote-tracking branch 'origin/master' into refactor_remove_constants
Cleanup.