First commit of Python code that actually works