This first cut is a straight port from Python. Once I build a few demos we can start to refactor this monstrosity.