Port docs

The docs still had example code in python. This pull request translates everything to groovy, fixes some mistakes, and adds a few bits.