Convert all code samples to groovy. Add a few more.