Fixed mangling, scope, it works.

Huge number of fixes, mostly involved with name mangling.

A dummy_test.py script has been included to give a tiny demo
of how to call this program.