Fixed decryption
Cleaned up repo, divided functions, added helper