Added some tests

These tests are not passed yet
Improved KeyStorage class