formatted python, updated scripts to newer apis