Implemented key function
Updated sjcl
Moved preventDefault() to top
Optimized encryption and decryption