Last refactor, split everything out as much as needed, added an array for the objects created.
Added stats, a css id for it, only runs if present.