Refactoring badges to table