Simplify basic Python, correct typos