introduced two separate inner classes for key derivation and other slight changes to the project