Continued work on generalized Python version