Added "badges" as user attainments. Lots of cleanup and additions.