tweak language, update formatting, pythonify functions