Fixed issue 105, fixed issue 107, refs issue 108

 - fixed the aes key hash
 - added support for fallback hashes to maintain compatibility with the broken version.
 - added keyhash collision support.
 - and unit tests for both of those fixes.
Whitespace and Style fixes & checkstyle config