refactoring theme library + bug fixing on badges