initial version of python interface working!
minor cleanup of python interface