Tidy up and use sandbox class allocation/free statistic macros.