Initial commit of python-ified code