Fix symmetric encryption and cleanup