Fixed CoG computation, now uses charge