Groovy: refactor properties