Remove logic from groovy script