Merge from badgeretl working branch