Revert the revert and fix the underlying issue
This reverts commit ba5023f5, reversing changes made to 88b71138.
Also fixes the underlying issue that caused badges to be broken. It was a mistake on my part, not understanding the clone
method was doing a shallow copy so as part of the API generation I was manipulating data that feeds the site. I updated to do a deep copy so its fixed now.
Edited by Pat Nadolny