Changed everything to a groovy class