Code is tested. Distortion in the final code not working yet.