Fixed js-to-python inconsistencies
misc typos