Ported to Groovy.

All Source is in Groovy except for code used in GUI Forms.