Small edits to python version