Fixed an issue where overlapping memory would overwrite itself like a motherfucker when freeing an element in the middle of a vector. Also added support for printing a memory report on shutdown