For some reason, the decrypt method of the scheme wants a public key, but does not use it. Fixed this and refactored variables
New API methods
Merge with master