Code documentation
Better error handling (using echo instead of die())
More appropriate class names for user modules and badges + module separations