Cleaning up encrypt code and removed progressbar