Finished decrypt function

Now testing and debugging