fix resources.groovy
latest batch of changes and bugfixes