force python2, change depreciated header functions, better argument defaults