removed obsolete class
fixed InvalidKeyError to be a function so that it generates proper error callstack
removed out commented code
Updated unit tests to reflect latest API changes.