Modified encryption and fixed IV issues.