Slight modifications to python interface.