Initialize result variable

Result variable was not being initialized.
Refactored lib/ids.py

And added tests for that library.
Refactored lib/signature

Signature libray is refactored.