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, especially about handlers. More docs to come in the future.