Made the code cleaner, (D)on't (R)epeat (Y)ourself

The code now has support for Badges and Tags.