Cleaned up machine learning util (excess python removed)