Restructure garbage collection