make all erbs real erbs
tidy, improve variable naming, add ATTRS