get rid of legacy and portability stuff
Merge branch 'master' into pv