updated python version
some edits to recent contributions for style consistency