Convert to a class that can run from groovysh