Cleaned up Groovy and Python example code.