fixes to distortion handling
Merge branch 'praxes_master'
Merge pull request #87 from joelvbernier/master

Cleanup distortion handling