Added a python script to emulate

And commented on how the code actually works. Or some of it. Very
confusing.